// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router';
import Login from '@/components/Login.vue'; // 导入登录组件
import Register from '@/components/Register.vue';
import Home from '@/components/Home.vue';
import FaceRecognition from '@/components/FaceRecognition.vue';
import FaceCapture from '@/components/FaceCapture.vue';
import TrafficViolation from '@/components/TrafficViolation.vue';
import BasicInfo from '@/components/BasicInfo.vue';
import Announcement from '@/components/Announcement.vue';
import SystemManagement from '@/components/SystemManagement.vue';

const routes = [
    {
        path: '/',
        component: Login
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/register',
        name: 'Register',
        component: Register
    },
    {
        path: '/home',
        name: 'Home',
        component: Home
    },
    {
        path: '/faceRecognition',
        name: 'FaceRecognition',
        component: FaceRecognition
    },
    {
        path: '/faceCapture',
        name: 'FaceCapture',
        component: FaceCapture
    },
    {
        path: '/trafficViolation',
        name: 'TrafficViolation',
        component: TrafficViolation
    },
    {
        path: '/basicInfo',
        name: 'BasicInfo',
        component: BasicInfo
    },
    {
        path: '/announcement',
        name: 'Announcement',
        component: Announcement
    },
    {
        path: '/systemManagement',
        name: 'SystemManagement',
        component: SystemManagement
    },
    // 其他路由
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});



export default router; // 确保正确导出 router 对象